<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!doctype html>
<html class="no-js">
<head>
    <%@ include file="./../common/meta.jsp" %>
    <link rel="stylesheet" href="../../css/ecshop-detail.css">
    <script type="text/javascript">
        var pid = "<%=request.getParameter("pid")%>";
        var num = "<%=request.getParameter("num")%>";
        var p = "<%=request.getParameter("p")%>";
        var spId = "<%=request.getParameter("spId")%>";

    </script>
</head>
<body>
<header data-am-sticky class="am-header am-header-default am-no-layout">
    <div class="am-header-left am-header-nav">
        <a href="./ecshop.jsp" class="">
            <i class="am-header-icon am-icon-chevron-left"></i>
        </a>
    </div>
    <h1 class="am-header-title">购物车</h1>
</header>
<div class="am-g am-content">
    <div class="am-u-sm-12 order-main">
        <span class="left icon-address">收货地址</span>
        <div class="buy-info address">

            <ul class="am-list" id="address-list">

            </ul>
        </div>
        <div id="shop-cart">


        </div>
        <div class="buy-info">
            <div class="buy-price" id="buyPrice">
                总金额:￥<span id="totalPrice">0</span>元
                龙凤币抵扣<span id="lfbdk">0</span>元
            </div>
        </div>
        <button type="button" class="am-btn am-btn-primary am-btn-block" data-am-modal="{target: '#my-popup'}"
                id="buyCartOrder">提交订单
        </button>
        </button>
    </div>
</div>

<%@ include file="./../common/footerNav.jsp" %>
<%@ include file="./../common/footer.jsp" %>
<script id="shop-cart-template" type="text/x-handlebars-template">
    {{#each this}}
    <table>
        <tr style="text-align: center">
            <td><input type="radio" value="{{productId}}" name="productId" class="productId" specId="{{spId}}"
                       cnt="{{cnt}}" price="{{price}}" lfb="{{lfb}}" lfbdk="{{lfbdk}}"></td>
            <td colspan="2"><a href="./ecshop-detail.jsp?pid={{productId}}"> <img src="{{imageUrl}}" width="50px"
                                                                                  height="50px"/></a></td>
            <td>{{productName}}</td>
            <td>x<span id="num" style="color: red">{{cnt}}</span></td>
            <td><span>[{{specColor}}{{specSize}}]</span></td>
            <td style="color: red">￥<span id="nowPrice">{{price}}(单价)</span></td>
        </tr>
    </table>
    {{/each}}
</script>
<script id="address-template" type="text/x-handlebars-template">
    {{#each this}}
    <li class="am-g addressShip" data-id="{{id}}">
        <label class="am-radio-inline">
            <input type="radio" name="address" id="">{{address}}
        </label>
    </li>
    {{/each}}
</script>
<script src="../../js/common/common.js"></script>
<script src="../../js/ecshop/shopping-cart.js"></script>
</body>
</html>